﻿@model ThesisSystem.ViewModels.Menus
@{
    Layout = null;
    var subId = Convert.ToInt32(ViewBag.SubID);
}

<!DOCTYPE html>

<html>
<head>
    <title>左侧菜单</title>
    <link href="@Url.Content("~/Content/CSS/Common.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/CSS/Page.css")" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="menu">
        <div class="left_nav">
            <ul>
                @foreach (var level2Menu in Model.Menus2)
                {
                    <li@Html.Raw(level2Menu.MenuID==subId?" class=\"now\"":"")><a href="@Url.Action("Left", "Menu", new { id = level2Menu.ParentID, subID = level2Menu.MenuID })" target="_self">@level2Menu.Title</a></li>
                }
            </ul>
        </div>
        <div class="right_nav">
            @foreach (var level3Menu in Model.Menus3)
            {
                <div class="sub_title">
                    <span>@level3Menu.Title</span>
                </div>
                <div class="sub_details">
                    <ul>
                        @foreach (var level4Menu in Model.Menus4.Where(m=>m.ParentID==level3Menu.MenuID).ToList())
                        {
                            <li><a href="@Url.Content("~/"+level4Menu.MenuUrl)" target="mainFrame">@level4Menu.Title</a></li>
                        }
                    </ul>
                </div>
            }
        </div>
    </div>
</body>
</html>
